<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Tìm kiếm MBA</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<style type="text/css">
<!--
.style4 {font-family: "Times New Roman", Times, serif; font-weight: bold; font-size: 18px; }
.style5 {
	color: #000099;
	font-weight: bold;
	font-style: italic;
}
-->
</style>
</head>

<body>

<?php include_once($_SERVER['DOCUMENT_ROOT']."/ketnoiCSDL.php"); 
	?>
	
<form name="timN0" method="POST" >

<p align="center">N0:
   <input type="text"  name="txtN0" value="Nhập vào số N0" onblur="if (this.value == '') {this.value = 'Nhập vào số N0';}" onfocus="if (this.value == 'Nhập vào số N0') {this.value ='';}"/>
    <label> &nbsp;&nbsp;&nbsp;
    <input type="submit" name="btnSearch" value= "Tìm"  />	
    </label>
</p>
<?php
 if ($_SERVER['REQUEST_METHOD'] == 'POST'){
	if(isset($_POST["btnSearch"])){
	
		$sql="select * from may_bien_ap where SO_N0='";
		$sql.=$_POST['txtN0']."'";
		$result=mysql_query($sql,$link);
	
		if(mysql_num_rows($result)!=0){
		session_start();
			$_SESSION["N0"]=$_POST['txtN0'];
			echo "<script language='javascript'>window.open('kqtimN0.php')</script>";
		
		}
	
		else {
			echo "<script language='javascript'>window.open('kocokq.php')</script>";	
			//echo "<script type='text/javascript'> alert('Không tìm thấy kết quả'); </script>";
		}
	}
}
?>

<p align="center">&nbsp;</p>
</p>
<p>&nbsp;</p>

</body>
</html>
